// 导出模块配置，用于外部引用和配置
module.exports = {
  // 配置插件选项，此处针对 Electron Builder 插件
  pluginOptions: {
    // 配置 Electron Builder 的相关选项
    electronBuilder: {
      // 启用 Node.js 的集成，允许在 Electron 中使用 Node.js 功能
      nodeIntegration: true,
      builderOptions: {
        productName: "Effector-demo",
        appId: "com.effector.demo",
        extraResources: {
          from: 'dist_electron/bundled',
          to: 'app',
          filter: ['**/*', '!package.json']
        },
        files: [
          '**/*',
          '!dist_electron/bundled/package.json'
        ],
        linux: {
          target: [
            {
              target: "AppImage",
              arch: ["arm64"]
            },
            {
              target: "deb",
              arch: ["arm64"]
            }
          ]
        },
        electronDownload: {
          arch: "arm64"
        }
      },
    }
  },
  publicPath: process.env.NODE_ENV === 'production' ? './' : '/',
  configureWebpack: {
    devtool: 'source-map'
  }
}